package com.config;

import com.baidu.disconf.client.DisconfMgrBean;
import com.baidu.disconf.client.DisconfMgrBeanSecond;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * Created by 石头哥哥 on 9/2/16.
 * PACKAGE_NAME:  com.config
 * COMMENT :
 */
@Configuration
@Component
public class DisConfig {
    /**
     * @return
     */
    @Bean(destroyMethod = "destroy")
    public DisconfMgrBean disconfMgrBean() {
        DisconfMgrBean disconfMgrBean = new DisconfMgrBean();
        disconfMgrBean.setScanPackage("com.config");
        return disconfMgrBean;
    }

    /**
     * @return
     */
    @Bean(destroyMethod = "destroy", initMethod = "init")
    public DisconfMgrBeanSecond disconfMgrBeanSecond() {
        return new DisconfMgrBeanSecond();
    }

}
